package com.chat.controller;


import com.chat.entry.dto.notes.SetNotesDTO;
import com.chat.result.Result;
import com.chat.service.IUserNotesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 好有备注表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-08-25
 */
@Slf4j
@Api(tags = "设置好友备注")
@RestController
@RequestMapping("/api/user-notes")
@RequiredArgsConstructor
public class UserNotesController {
    private final IUserNotesService userNotesService;

    @ApiOperation(value = "设置好友备注", notes = "根据用户id设置备注")
    @PostMapping("/setNotes")
    public Result setNote(
            @ApiParam(value = "好有备注信息", required = true) SetNotesDTO setNotesDTO
    ) {
        return userNotesService.setNote(setNotesDTO);
    }
}
